
<div id="zt-colleft">
    <div id="zt-colleft-pad">
        <div id="zt-contentwrap">
            <!-- begin left main container-->
            <div id="zt-content-left" style="width: 100%;">
                <div id="zt-content">
                    <div id="zt-content-pad">

                        <div id="system-message-container"><?php if (count($ds) <= 0) echo "Hiện chưa có bài viết nào. Chúng tôi sẽ sớm cập nhật thông tin"; ?></div>
                        <!-- begin main content-->
                        <?php
                        if (count($ds) >= 0) {
                            if (count($ds) == 1) {
                                ?>

                                <div class="blog">
                                    <div class="items-leading">
			<div class="leading-0">
                                    <!-- content -->
                                    <?php $article = $ds[0]; ?>
                                    <h2 class="contentheading">
                                        <a href="danhmuc.php?id=<?php echo $article->getIdSubject(); ?>">
                                            <?php echo $article->getName(); ?></a>
                                    </h2>
                                    <!-- article content-->
                                    <?php echo $article->getContent(); ?>
                                    <!-- end article content -->
                                    <!-- end content -->
                        </div> </div>
                                </div>
                                <?php
                                    if (count($ds) > 1) {
                                ?>
                                <div class="extranews_separator">
                                </div>
                                <div class="extranews_box">
                                    <h2>
                                        <strong>Tin cùng chủ đề</strong>
                                    </h2>
                                    <div class="extranews_related">
                                        <ul class="related">
                                            <?php for($j = 1; $j < count($ds); $j++){ 
                                                $art = $ds[$j];
                                            ?>
                                            
                                            <li>
                                                <a href="danhmuc.php?id=<?php echo $art->getIdSubject(); ?>detail=true" title="<?php echo $art->getName(); ?>"><?php echo $art->getName(); ?> - <span class="extranews_date"><?php echo $art->getTime(); ?></span>
                                                </a>
                                            </li>
                                            <?php } ?>
                                        </ul>
                                    </div>
                                </div>
                                    <?php } ?>
                            <?php } else { ?>
                                <div class="blog">
                                    <?php
                                    $i = 0;
                                    foreach ($ds as $item) {
                                        $index = mb_strpos($item->getContent(), '.', 350);
                                        $shortContent = mb_substr($item->getContent(), 0, $index+1);
                                        ?>
                                        <div class="items-row cols-1 row-<?php echo $i++; ?>">
                                            <div class="item column-1">

                                                <h2>
                                                    <a href="danhmuc.php?id=<?php echo $item->getId(); ?>&detail=true">
                                                        <?php echo $item->getName(); ?></a>
                                                </h2>
                                                <p>
                                                    <?php echo $shortContent; ?>
                                                </p>
                                                <p class="readmore">
                                                    <a href="danhmuc.php?id=<?php echo $item->getId(); ?>&detail=true">
                                                        Xem tiếp...</a>
                                                </p>
                                                <div class="item-separator"></div>
                                            </div>
                                            <span class="row-separator"></span>
                                        </div>
                                    <?php } ?>
                                </div>
                                <!-- end main content-->
                            <?php }
                        }
                        ?>
                    </div>
                </div>
            </div>

            <!-- end left main container-->

        </div>

        <!-- Begin Spotlight 2 -->
        <?php
        include 'spotlight2.php';
        ?>
        <!-- End Spotlight 2 -->

    </div>
</div>


